import java.util.HashMap;

/**
 * Implementación de WordSet con HashMap
 * @author Dennisse
 */
public class HashSet implements WordSet {

    private HashMap<String, String> HashTable;
    public HashSet(){
    HashTable = new HashMap();
    }
    @Override
    public void add(Word wordObject) {
        HashTable.put(wordObject.getWord(),wordObject.getType() );
         }

    @Override
    public Word get(Word word) {
        if (!(HashTable.containsKey(word.getWord())))
            return null;
        return new Word(word.getWord(),HashTable.get(word.getWord()));
         }
    
    
}